<script lang="ts">
import { defineComponent, ref } from 'vue'

export default defineComponent({
  setup() {
    const count = ref(0)
    function click() {
      count.value += 1
    }
    return {
      count,
      click
    }
  }
})
</script>
<template>
  <div>
    <h1>click: {{ count }}</h1>
    <button @click="click">点我</button>
  </div>
</template>
